﻿namespace OasisCiq.Xpil
{
    using System;
    using System.Linq;

    /// <summary>
    /// List of information types used for birth information
    /// </summary>
    public class BirthInfoElementList : XS.XSNormalizedString
    {
        private static readonly string[] PossibleValues = new[]
        {
            "BirthStar", // Commonly used in some oriental cultures
            "BirthPlace", // A free text descriprion of the birth place, e.g. country name, region, etc.
            "BirthSign" // Specific to some cultures
        };

        public BirthInfoElementList(string value)
            : base(value)
        {
            if (!PossibleValues.Contains(value))
            {
                throw new ArgumentOutOfRangeException();
            }
        }
    }
}